<?php
define("PATHDRASTICTOOLS", "");
include(PATHDRASTICTOOLS."Examplemysqlconfig.php");
include(PATHDRASTICTOOLS."drasticSrcMySQL.class.php");

class mysrc extends drasticSrcMySQL {
    protected function select(){
        $query="SELECT city.id,city.name,COUNT(property.offer_type) AS number FROM city,property WHERE property.cityId=city.id GROUP BY name";
        $res = mysql_query($query, $this->conn) or die(mysql_error());
        return ($res);
    }

}

$options = array(
        "delete_allowed" => false,
        "add_allowed" => false,
        "editablecols" => array ()
);
$src = new mysrc($server, $user, $pw, $db, "city", $options);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

    <head>
        <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
        <meta name="author" content="Tezeuz" />
        <!-- Dependencies -->
        <!-- Sam Skin CSS for TabView -->
        <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/tabview/assets/skins/sam/tabview.css">

        <!-- JavaScript Dependencies for Tabview: -->
        <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
        <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/element/element-beta-min.js"></script>

        <!-- OPTIONAL: Connection (required for dynamic loading of data) -->
        <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/connection/connection-min.js"></script>

        <!-- Source file for TabView -->
        <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/tabview/tabview-min.js"></script>

        <link rel="stylesheet" type="text/css" href="css/style.css" title="style" />
        <link rel="stylesheet" type="text/css" href="css/cloud_default.css"/>
        <link rel="stylesheet" type="text/css" href="css/grid_default.css"/>
        <link rel="stylesheet" type="text/css" href="css/map_default.css"/>
        <title>&#187;&#187;EMLAKIA</title>
        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAaxMP4bYZJjdYhLLSqgpoAhSnofh1JCg1pwZ2XCrsox0gt0Nb2RQY62rtQAdTQ5mhl6COZ3UudJhV_w&hl=tr"
                type="text/javascript"></script>
        <script src="http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/src/markermanager.js"></script>

        <script src="js/map.js" type="text/javascript"></script>

    </head>

    <body class="yui-skin-sam" onunload="GUnload()">
        <script type="text/javascript" src="js/mootools-1.2-core.js"></script>
        <script type="text/javascript" src="js/mootools-1.2-more.js"></script>
        <script type="text/javascript" src="js/drasticCloud.js"></script>
        <script type="text/javascript" src="js/drasticGrid.js"></script>
        <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=<?php echo $GApiKey ?>"></script>
        <script type="text/javascript" src="js/markermanager.js"></script>
        <script type="text/javascript" src="js/drasticMap.js"></script>

        <div class="mainContainer">
            <div class="search">
                <form action="#" method="post">
                    <div id="texbox">Search
                        <input type="text" name="search" class="searchbox" />
                        <input type="submit" value="Ara" />
                    </div>
                </form>
            </div>
            <div class="supBar">
                <h1><span class="blue">E</span>mlaki<span class="blue">A </span> <span class="gray">| Emlak Harita Uygulamasi</span></h1>
            </div>
            <div style="position:absolute;left:850px;width:100px;"> <input type="button" value="+ Yeni Emlak" /></div>
            <?php include("parts/index/mainTab.php");?>
            
            <div class="propertySearch">
                <?php include("parts/searchTab.php");?>
            </div>

            <div class="subContainer">

                <div class="subLinks">
                    <a href="index.html"> Company</a> |
                    <a href="index.html"> Products</a> |
                    <a href="index.html"> Services</a> |
                    <a href="index.html"> Partners</a> |
                    <a href="index.html"> Clients</a> |
                    <a href="index.html"> Contact</a>
                </div><!-- End subLinks-->

                <div class="copyright">
                    powered by <a href="http://www.oswd.org">OSWD</a>   |
                    <a href="http://validator.w3.org/check/referer"> Valid XHTML</a> |
                    <a href="http://jigsaw.w3.org/css-validator/check/referer">Valid CSS</a>
                </div>
                <!-- End copyright-->

            </div> <!-- End subContainer-->

        </div><!-- End mainContainer-->
        
    </body>

</html>